.386
.model flat,stdcall
option casemap:none
include msvcrt.inc
includelib msvcrt.lib
printf  proto C:dword,:dword
.data
lb_write_int db '%d',0
lb_writeln_int db '%d',0ah,0dh,0
lb_write_real db '%lf',0
lb_writeln_real db '%lf',0ah,0dh,0
lb_tmp db 0, 0, 0, 0, 0, 0, 0, 0
lb_read_int db '%d',0
lb_read_real db '%f',0
_REAL_DATA_0 dd 1.000000
_REAL_DATA_1 dd 2.300000
_REAL_DATA_2 dd 1.500000

.code
f:
sub esp, 4
mov edi, 4
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
mov edi, 8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
add esp, 4
ret
f:
sub esp, 4
mov edi, 4
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
mov edi, 8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
add esp, 4
ret
p:
sub esp, 4
mov edi, 4
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
mov eax, 0
push eax
pop ebx
pop eax
add eax, ebx
push eax
mov edi, 4
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
add esp, 4
ret
p:
sub esp, 4
mov edi, 4
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
mov eax, 0
push eax
pop ebx
pop eax
add eax, ebx
push eax
mov edi, 4
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
add esp, 4
ret
main PROC
mov ecx, esp
sub esp, 20
mov eax, 0
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
mov eax, _REAL_DATA_0
push eax
mov edi, -12
mov esi, ecx
add esi, edi
mov eax, dword ptr [esi]; calculate ExpId(type: real)
pop eax
mov [esi-0], eax
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
push ecx
mov ecx, esp
call func
pop ecx
pop eax
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
push eax
mov edi, -12
mov esi, ecx
add esi, edi
mov eax, dword ptr [esi]; calculate ExpId(type: real)
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
push ecx
mov ecx, esp
call f
pop ecx
pop eax
pop eax
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
push eax
mov edi, -12
mov esi, ecx
add esi, edi
mov eax, dword ptr [esi]; calculate ExpId(type: real)
push eax
push ecx
mov ecx, esp
call f
pop ecx
pop eax
pop eax
push eax
mov edi, -12
mov esi, ecx
add esi, edi
mov eax, dword ptr [esi]; calculate ExpId(type: real)
pop eax
mov [esi-0], eax
mov eax, 0
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
mov eax, 0
push eax
mov eax, _REAL_DATA_1
mov ebx, 0
sub eax, ebx
mov ebx, 4
imul eax,ebx
mov edi, -16
add edi, eax
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
mov edi, -12
mov esi, ecx
add esi, edi
mov eax, dword ptr [esi]; calculate ExpId(type: real)
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
push eax
mov eax, _REAL_DATA_2
push eax
pop ebx
pop eax
add eax, ebx
push eax
mov edi, -8
mov esi, ecx
add esi, edi
mov eax, [esi]; calculate ExpId 
pop eax
mov [esi-0], eax
add esp, 20
ret
main ENDP
END main

